class Vue {
  constructor(option) {
    this.el = option.el;
    this.$data = option.data;
    this.$methods = option.methods;
    this.$mounted = option.mounted;
    this.$watch = option.watch


    new Observe(this, '$data')
    new Driver(this, '$data')
    new Compiler(this.el, this)

    Object.keys(option.watch).forEach(key=> {
      const fn = option.watch[key]
      if(fn) {
        new Watcher(this.$data, key, fn)
        
      }

    })

  }
}





// js 操作dom 元素事件

